%{
#include "test.tab.h"
%}
string \"((\\\")|[^"])*\"
%%
"{"	{return L_BRACKET;}
"}" {return R_BRACKET;}
"["	{return LM_BRACKET;}
"]" {return RM_BRACKET;}
"," {return COMMA;}
":"	{return COLON;}
{string}	{
	int len = strlen(yytext);
	//printf("yytext:%s\n",yytext);
	char *res = strdup(yytext);
	res[len - 1] = '\0';
	res += 1;
	yylval.strval = res;
	return ANY_STRING;
}

-?[0-9]+	{
	yylval.strval = strdup(yytext);
	return NUM_INT;
}
-?[0-9]+\.[0-9]+ {
	yylval.strval = strdup(yytext);
	return NUM_FLOAT;
}

\n	{}
[ \t]	{}
. { printf("other char: %s\n", yytext); }
%%
